from django.urls import path
from . import views

urlpatterns = [
    path('',views.index,name="mainpage"),
    path('register/', views.register, name='register'),
    path('login/', views.login, name='login'),
    path('logout/', views.logout, name='logout'),
    path('upload/', views.upload_image, name='upload'),
    path('images/',views.image_list,name="image_list"),
    path('search/', views.advanced_search, name='advanced_search'),
    path('images/<int:image_id>/', views.view_image, name='image_detail'),
    path('api/gettags/',views.get_all_tags,name="get_all_tags"),
    path('api/random',views.random_choice,name="random_choice"),
    path('random/',views.random_view,name="random_view"),
    path('api/addtag/',views.add_tag,name="add_tag"),
    path('api/alttag/',views.alter_tag,name="alter_tag"),
    path('api/deltag/',views.del_tag,name="del_tag"),
    path('api/islogin/',views.islogin,name="is_login"),
    path('api/isadmin/',views.isadmin,name="is_admin"),
    path('api/getuserinfo/',views.get_user_info,name="get_user_info"),
    path('api/getimagebyid/',views.get_image_by_id,name="get_image_by_id"),
    path('api/setuserinfo/',views.set_user_info,name="set_user_info"),
    path('api/getimagecount/',views.get_image_count,name="get_image_count"),
    path('user/<int:userid>/', views.user_profile, name='user_profile'),
    path('api/switchdisplay/',views.switch_status,name='switch_display'),
    path('api/getuseridbyname',views.get_user_id_by_name,name="get_user_id_by_name")
    #path('user/', views.get_current_user, name='current_user'),
]
